docs including reference to bugzilla bug about how we should have a better
authorHavoc Pennington <hp@redhat.com>
Wed, 14 Nov 2001 00:26:14 +0000 (00:26 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Wed, 14 Nov 2001 00:26:14 +0000 (00:26 +0000)
2001-11-13  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
including reference to bugzilla bug about how we should have
a better way of positioning children

* gtk/gtktextview.h (struct _GtkTextViewClass): add some padding

* gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
size to side rects if they don't exist, #63438

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextview.c
gtk/gtktextview.h

index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 3171ae2bb4dfe694459a2a070c1e0eef3ce925e8..fb718741dedd9f70fba7b19c78ead53e2892b425 100644 (file)
@@ -1,3 +1,14 @@
+2001-11-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_add_child_in_window): docs
+       including reference to bugzilla bug about how we should have 
+       a better way of positioning children
+
+       * gtk/gtktextview.h (struct _GtkTextViewClass): add some padding
+
+       * gtk/gtktextview.c (gtk_text_view_size_allocate): assign zero
+       size to side rects if they don't exist, #63438
+
 2001-11-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_key_press_event): fix to
index 25b5e0c5d181fb6d124a96a0790a6adec0e4683b..5427d8fbb8f8cce2c2148e887ba346f220789b45 100644 (file)
@@ -2612,7 +2612,7 @@ gtk_text_view_size_allocate (GtkWidget *widget,
    */
 
   gtk_widget_style_get (widget, "interior_focus", &interior_focus, NULL);
-
+  
   if (interior_focus)
     focus_edge_width = 0;
   else
@@ -2623,14 +2623,14 @@ gtk_text_view_size_allocate (GtkWidget *widget,
   if (text_view->left_window)
     left_rect.width = text_view->left_window->requisition.width;
   else
-    left_rect.width = 1;
+    left_rect.width = 0;
 
   width -= left_rect.width;
 
   if (text_view->right_window)
     right_rect.width = text_view->right_window->requisition.width;
   else
-    right_rect.width = 1;
+    right_rect.width = 0;
 
   width -= right_rect.width;
 
@@ -2645,14 +2645,14 @@ gtk_text_view_size_allocate (GtkWidget *widget,
   if (text_view->top_window)
     top_rect.height = text_view->top_window->requisition.height;
   else
-    top_rect.height = 1;
+    top_rect.height = 0;
 
   height -= top_rect.height;
 
   if (text_view->bottom_window)
     bottom_rect.height = text_view->bottom_window->requisition.height;
   else
-    bottom_rect.height = 1;
+    bottom_rect.height = 0;
 
   height -= bottom_rect.height;
 
@@ -6718,6 +6718,32 @@ gtk_text_view_add_child_at_anchor (GtkTextView          *text_view,
   g_assert (gtk_widget_get_parent (child) == GTK_WIDGET (text_view));
 }
 
+/**
+ * gtk_text_view_add_child_in_window:
+ * @text_view: a #GtkTextView
+ * @child: a #GtkWidget
+ * @which_window: which window the child should appear in
+ * @xpos: X position of child in window coordinates
+ * @ypos: Y position of child in window coordinates
+ *
+ * Adds a child at fixed coordinates in one of the text widget's
+ * windows.  The window must have nonzero size (see
+ * gtk_text_view_set_border_window_size()).  Note that the child
+ * coordinates are given relative to the #GdkWindow in question, and
+ * that these coordinates have no sane relationship to scrolling. When
+ * placing a child in #GTK_TEXT_WINDOW_WIDGET, scrolling is
+ * irrelevant, the child floats above all scrollable areas. But when
+ * placing a child in one of the scrollable windows (border windows or
+ * text window), you'll need to compute the child's correct position
+ * in buffer coordinates any time scrolling occurs or buffer changes
+ * occur, and then call gtk_text_view_move_child() to update the
+ * child's position. Unfortunately there's no good way to detect that
+ * scrolling has occurred, using the current API; a possible hack
+ * would be to update all child positions when the scroll adjustments
+ * change or the text buffer changes. See bug 64518 on
+ * bugzilla.gnome.org for status of fixing this issue.
+ *
+ **/
 void
 gtk_text_view_add_child_in_window (GtkTextView          *text_view,
                                    GtkWidget            *child,
@@ -6740,6 +6766,16 @@ gtk_text_view_add_child_in_window (GtkTextView          *text_view,
   g_assert (gtk_widget_get_parent (child) == GTK_WIDGET (text_view));
 }
 
+/**
+ * gtk_text_view_move_child:
+ * @text_view: a #GtkTextView
+ * @child: child widget already added to the text view
+ * @xpos: new X position in window coordinates
+ * @ypos: new Y position in window coordinates
+ *
+ * Updates the position of a child, as for gtk_text_view_add_child_in_window().
+ * 
+ **/
 void
 gtk_text_view_move_child          (GtkTextView          *text_view,
                                    GtkWidget            *child,
index e296c4621d4ab5a088050e270a646bfa62fff26e..33b17e8adc269ea0c9e1d2f811779d6091f09cb1 100644 (file)
@@ -184,6 +184,11 @@ struct _GtkTextViewClass
   void (* paste_clipboard) (GtkTextView *text_view);
   /* overwrite */
   void (* toggle_overwrite) (GtkTextView *text_view);
+
+  GtkFunction pad1;
+  GtkFunction pad2;
+  GtkFunction pad3;
+  GtkFunction pad4;
 };
 
 GtkType        gtk_text_view_get_type              (void) G_GNUC_CONST;